// .txt

beginzonescript;

variables;

short crime_tolerance = 200;
short last_abil;
short i;
short walk_count = 0;

body;

beginstate INIT_STATE;

//	set_name(,"");
//	add_range_to_group(first,last,whichg);

	set_level(10,24);
	set_level(11,24);
	set_level(12,24);
	set_level(13,24);
	
	set_name(22,"Gaseous Rotworm");
	set_name(23,"Gaseous Rotworm");
	set_name(24,"Gaseous Rotworm");
	set_level(22,24);
	set_level(23,24);
	set_level(24,24);
	set_boss_level(22,1);
	set_boss_level(23,1);
	set_boss_level(24,1);

	add_range_to_group(37,43,1);
	set_name(1001,"Brawling Thahd");
	set_new_abil(1001,20);
	set_level(1001,24);
	
	//if (get_sdf() > 0) {
		//make_zone_hostile();
		//}

	last_abil = get_current_tick();
	
	set_crime_tolerance(crime_tolerance);
	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
	// clear zone?
	if ((zone_clear(ME) == FALSE) && (get_flag(65,7) > 0)) {
		print_str_color("Now that the camp has been retaken, you can pass this",2);
		print_str_color("  area safely.",2);
		award_party_xp(100,30);
		clear_zone(ME);	
		}
		
	//if ((get_crime_level() >= crime_tolerance) && (get_sdf(,) == 0)) {
	//	make_zone_hostile();
	//	set_flag(,,1);
	//	}

	// if (gf(,) == 0) {
	//	if (get_ran(1,0,100) < 10)
	//		give_char_text_bubble(,"");
	//	}
	
	if (((is_combat()) && (tick_difference(last_abil,get_current_tick()) > 0)) || ((is_group()) && (tick_difference(last_abil,get_current_tick()) > 5))) {
		last_abil = get_current_tick();
	
		walk_count = walk_count + 1;
		if (walk_count == 2) {
			walk_count = 0;
			if (gf(65,6) == 0) 
				sf(65,6,1);
				else sf(65,6,0);
			}
		}
break;

//beginstate 10;
//break;

//	print_str("");
//	set_terrain_string_range(".",3);
//	set_terrain_string_range("The sign says - .",3);
